package com.aierjun.test.utils;

import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by aierJun on 2016/12/13.
 */
public class ProgressDialogUtils {
    private static ProgressDialog pd;
    public static ProgressDialogUtils self;
	public static synchronized ProgressDialogUtils getInstances(Context context){
		if (self==null){
			self=new ProgressDialogUtils();
		}
		return self;
	}
    public void progressDialog(Context context){
        pd = new ProgressDialog(context);//加载的ProgressDialog
        pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);//选择加载风格 这里是圆圈 STYLE_HORIZONTAL 是水平进度条
        pd.setMessage("加载中....");
    }
    public static void show(){
        pd.show();
    }
    public static void dismiss(){
        pd.dismiss();
    }
}
